<?php

use Illuminate\Database\Seeder;
use App\Models\User;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::create([
            'name' => 'Admin',
            'email' => 'admin@admin.com',
            'password' => bcrypt('admin1234'),
            'avatar' => 'https://lorempixel.com/200/200/?41437'
        ]);

        factory(User::class, 50)->create()->each(function (User $u) {
            $u->save();
        });
    }
}
